<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/views/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/views/include/nocachehead.jsp"%>
<title><c:out value="${requestScope.ownerName}" />的相册</title>
<style type="text/css">
.album_photo{width: 140px;height: 140px;background: url('${pageContext.request.contextPath}/img/albumback.gif') 0px 0px no-repeat;}
.album{padding-top:6px;padding-left:6px}
img {border: 0px;}
body {font-size: 12px}
</style>
</head>
<body style="">
	<div>
		<!-- main content start -->
		<div>
			<!-- title nav start -->
			<div>相册  <a href="${pageContext.request.contextPath}/wo/${requestScope.ownerId}.html"><c:out value="${requestScope.ownerName}" /></a><c:out value="${requestScope.ownerName}" />的相册</div>
			<!-- title nav end -->
			<!-- newalbum start -->
			<skyline:setSessionAttrToVar var="SESSION_USER" key="SESSION_USER"/>
			<c:if test="${requestScope.ownerId eq pageScope.SESSION_USER.id}">
			<div><a href="${pageContext.request.contextPath}/album/newalbum.html">创建相册</a></div>
			</c:if>
			<!-- newalbum end -->
			<!-- album content start -->
			<div>
			总共<span>${requestScope.page.total }</span>个相册
			<skyline:page url="${pageContext.request.contextPath}/album/list/${requestScope.ownerId}.html" page="${requestScope.page}" maxSize="5" />
			<!-- album list start -->
			<div>
				<c:forEach items="${requestScope.albums}" var="album" varStatus="status">
				<div>
					<div class="album_photo">
						<a title="<c:out value="${album.albumName}" />" href="${pageContext.request.contextPath}/album/view/${album.id }.html"><img alt="<skyline:summary length="17" value="${album.albumName}" />" class="album" src="${pageContext.request.contextPath}/image/${album.cover}.${album.coverExt}" /></a>
					</div>
					<div>
						<a title="<c:out value="${album.albumName}" />" href="${pageContext.request.contextPath}/album/view/${album.id }.html"><skyline:summary length="17" value="${album.albumName}" /></a>
						<div><span title="<c:out value="${album.place}" />"><skyline:summary length="17" value="${album.place}" /></span></div>
						<div><span title="<c:out value="${album.description}" />"><skyline:summary length="40" value="${album.description}" /></span></div>
						<span>${album.photoNum}张照片</span>
						<fmt:formatDate value="${album.createTime}" pattern="yyyy-MM-dd"/>创建
						<c:if test="${album.ownerId eq pageScope.SESSION_USER.id}">
						<div>
							<c:if test="${album.activity ne 'UNDELETABLE'}">
							<span><a title="编辑" href="${pageContext.request.contextPath}/album/editalbum/${album.id }.html?curpage=${requestScope.page.curpage }">编辑</a></span>
							| <span><a title="上传照片" href="${pageContext.request.contextPath}/album/bupload/${album.id }.html">上传照片</a></span>
							| <span><a title="删除" href="#" onclick="if(window.confirm('你确定要删除${album.albumName}吗?')){window.location='${pageContext.request.contextPath}/album/delalbum/${album.id }.html?curpage=${requestScope.page.curpage }';}">删除</a></span>
							</c:if>
						</div>
						</c:if>
					</div>
				</div>
				<c:if test="${status.index%4 eq 0}">
					<div class="clear"></div>
				</c:if>
				</c:forEach>
			</div>
			<!-- album list end -->
			<skyline:page url="${pageContext.request.contextPath}/album/list/${requestScope.ownerId}.html" page="${requestScope.page}" maxSize="5" />
			</div>
			<!-- album content end -->
		</div>
		<!-- main content end -->
	</div>
</body>
</html>